fn main() {
    println!("Hello, world!");
    info("吴秋明",18,'男');
    println!("height is {}",height(162));
    println!("address is {}",address("四川成都"));
}
//带参函数，必须定义参数的类型
fn info(name:&str,age:u8,sex:char){
    println!("my name is {}",name);
    println!("age is {}",age);
    println!("sex is {}",sex);
}

//带返回值函数
fn height(h:u8)->u8{
    h
}

//语句和表达式
fn address(address:&str)->String{
    //语句
    let _address: String = String::from("中国");
    //表达式，最后一行不以分号结束，返回最后一行的值
    //这里需要了解下String、&String和&str的区别
    {
        _address + &address
    }
}

